import dayjs from 'dayjs';
import utc from 'dayjs/plugin/utc';

dayjs.extend(utc);

const DATE_TIME_FORMATTER = 'YYYY-MM-DD HH:mm:ss';

export const timeFormatterUtc = (
  utcString: string,
  format = DATE_TIME_FORMATTER
) => dayjs.utc(utcString).utcOffset(8).format(format);
